#include <stdio.h>
main(){
    int c, nl;
    nl = 0;
//    97是字母a
    while ((c = getchar()) != 97) {
        if (c == '\n') {
            ++nl;
        }
    }
    printf("%d\n", nl);
}